package com.weido.nettyServer.core;

/**
 * Created by chenli on 2019/11/11.
 */

public abstract class MiNiServlet {
    public void service(HttpRequest request, HttpResponse response) {
        if ("GET".equalsIgnoreCase(request.getMethod())){
            doGet(request,response);
        }else{
            doPost(request,response);
        }
    }

    protected abstract void doPost(HttpRequest request, HttpResponse response);

    protected abstract void doGet(HttpRequest request, HttpResponse response);
}

